using System;
using System.Collections.Generic;
using System.Text;
using System.Data;

namespace DTO
{
    public class ANDInfo
    {
		#region Local Variable
		private String _SUN_DB;
		public String SUN_DB
		{
			get { return _SUN_DB; }
			set { _SUN_DB = value; }
		}
		private String _LOOKUP;
		public String LOOKUP
		{
			get { return _LOOKUP; }
			set { _LOOKUP = value; }
		}
		private String _UPDATED;
		public String UPDATED
		{
			get { return _UPDATED; }
			set { _UPDATED = value; }
		}
		private String _CATEGORY;
		public String CATEGORY
		{
			get { return _CATEGORY; }
			set { _CATEGORY = value; }
		}
		private String _SUBCATEGORY;
		public String SUBCATEGORY
		{
			get { return _SUBCATEGORY; }
			set { _SUBCATEGORY = value; }
		}
		private String _DESCRIPTION;
		public String DESCRIPTION
		{
			get { return _DESCRIPTION; }
			set { _DESCRIPTION = value; }
		}
		private String _SHORTDESC;
		public String SHORTDESC
		{
			get { return _SHORTDESC; }
			set { _SHORTDESC = value; }
		}
		private String _MASK;
		public String MASK
		{
			get { return _MASK; }
			set { _MASK = value; }
		}
		private String _NONVALIDATED;
		public String NONVALIDATED
		{
			get { return _NONVALIDATED; }
			set { _NONVALIDATED = value; }
		}
		private String _AMENDABLE;
		public String AMENDABLE
		{
			get { return _AMENDABLE; }
			set { _AMENDABLE = value; }
		}
        #endregion LocalVariable
        
        #region Constructor
		public ANDInfo()
		{
			_SUN_DB = "";
			_LOOKUP = "";
			_UPDATED = "";
			_CATEGORY = "";
			_SUBCATEGORY = "";
			_DESCRIPTION = "";
			_SHORTDESC = "";
			_MASK = "";
			_NONVALIDATED = "";
			_AMENDABLE = "";
		}
		public ANDInfo(
			String SUN_DB,
			String LOOKUP,
			String UPDATED,
			String CATEGORY,
			String SUBCATEGORY,
			String DESCRIPTION,
			String SHORTDESC,
			String MASK,
			String NONVALIDATED,
			String AMENDABLE
			)
		{
			_SUN_DB = SUN_DB;
			_LOOKUP = LOOKUP;
			_UPDATED = UPDATED;
			_CATEGORY = CATEGORY;
			_SUBCATEGORY = SUBCATEGORY;
			_DESCRIPTION = DESCRIPTION;
			_SHORTDESC = SHORTDESC;
			_MASK = MASK;
			_NONVALIDATED = NONVALIDATED;
			_AMENDABLE = AMENDABLE;
		}
		public ANDInfo(DataRow dr)
		{
			if (dr != null)
			{
				_SUN_DB = dr["SUN_DB"] == DBNull.Value ? "" : (String)dr["SUN_DB"];
				_LOOKUP = dr["LOOKUP"] == DBNull.Value ? "" : (String)dr["LOOKUP"];
				_UPDATED = dr["UPDATED"] == DBNull.Value ? "" : (String)dr["UPDATED"];
				_CATEGORY = dr["CATEGORY"] == DBNull.Value ? "" : (String)dr["CATEGORY"];
				_SUBCATEGORY = dr["SUBCATEGORY"] == DBNull.Value ? "" : (String)dr["SUBCATEGORY"];
				_DESCRIPTION = dr["DESCRIPTION"] == DBNull.Value ? "" : (String)dr["DESCRIPTION"];
				_SHORTDESC = dr["SHORTDESC"] == DBNull.Value ? "" : (String)dr["SHORTDESC"];
				_MASK = dr["MASK"] == DBNull.Value ? "" : (String)dr["MASK"];
				_NONVALIDATED = dr["NONVALIDATED"] == DBNull.Value ? "" : (String)dr["NONVALIDATED"];
				_AMENDABLE = dr["AMENDABLE"] == DBNull.Value ? "" : (String)dr["AMENDABLE"];
			}
		}
        #endregion Constructor
        
        #region InitTable
		public DataTable ToDataTable()
		{
			DataTable dt = new DataTable("TblAND");
			dt.Columns.AddRange(new DataColumn[] { 
				new DataColumn("SUN_DB", typeof(String)),
				new DataColumn("LOOKUP", typeof(String)),
				new DataColumn("UPDATED", typeof(String)),
				new DataColumn("CATEGORY", typeof(String)),
				new DataColumn("SUBCATEGORY", typeof(String)),
				new DataColumn("DESCRIPTION", typeof(String)),
				new DataColumn("SHORTDESC", typeof(String)),
				new DataColumn("MASK", typeof(String)),
				new DataColumn("NONVALIDATED", typeof(String)),
				new DataColumn("AMENDABLE", typeof(String))
				});
			return dt;
		}
		public DataRow ToDataRow(DataTable dt)
		{
			DataRow row = dt.NewRow();
			row["SUN_DB"] = _SUN_DB;
			row["LOOKUP"] = _LOOKUP;
			row["UPDATED"] = _UPDATED;
			row["CATEGORY"] = _CATEGORY;
			row["SUBCATEGORY"] = _SUBCATEGORY;
			row["DESCRIPTION"] = _DESCRIPTION;
			row["SHORTDESC"] = _SHORTDESC;
			row["MASK"] = _MASK;
			row["NONVALIDATED"] = _NONVALIDATED;
			row["AMENDABLE"] = _AMENDABLE;
			return row;
		}
        #endregion InitTable

        public DataTable ToTransferInStruct()
        {
            throw new NotImplementedException();
        }
    }
}
